﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FilterWebList.aspx.cs" Inherits="FilterWebList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/lib.js"></script>
    <script type="text/javascript">
        $(function () {
            BindBtn();
            AddTrClass($("#listinfo"));
        })
        function ShowDialog(type, id) {
            var url = "", title;
            switch (type) {
                case 1:
                    title = "编辑网站";
                    url = "DoFilterWeb.aspx?type=edit&id=" + id;
                    break;
                case 2:
                    title = "新增网站";
                    url = "DoFilterWeb.aspx?type=add";
                    break;
            }
            top.CreateIframe(title, url, 500, 100);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="conBox">
        <table class="form-table">
            <thead>
                <tr>
                    <td colspan="3">
                        查询选项
                    </td>
                </tr>
            </thead>
            <tbody>
                <tr class="tr1">
                    <td class="oneTd">
                        <div>
                            名称：<asp:TextBox ID="txtName" runat="server" CssClass="txtbox"></asp:TextBox>
                            <asp:Button ID="btnSubmit" runat="server" Text="查询" OnClick="btnSubmit_Click" CssClass="button" />
                            <asp:Button ID="btnReset" runat="server" Text="重置" OnClick="btnReset_Click" CssClass="button"
                                Style="display: none;" /></div>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="ctrlbar">
            <div class="f-left">
            </div>
            <div class="f-right">
                <a href="javascript:ShowDialog(2,0)" class="toolbtn">
                    <img src="images/ico-add.gif">新 增</a>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="grid-box">
            <table class="grid-table">
                <thead>
                    <tr>
                        <th class="align-l" style="width: 50px;">
                            序号
                        </th>
                        <td class="align-l">
                            名称
                        </td>
                        <td class="align-l">
                            网址
                        </td>
                        <td class="align-l" style="width: 120px;">
                            创建日期
                        </td>
                        <td class="align-c">
                            编辑
                        </td>
                        <td class="align-c">
                            删除
                        </td>
                    </tr>
                </thead>
                <tbody id="listinfo">
                    <asp:Repeater ID="rptFilterWeb" runat="server" OnItemCommand="rptFilterWeb_ItemCommand">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <%#nNum++%>
                                </td>
                                <td>
                                    <a href="http://<%#Eval("Url")%>" target="_blank">
                                        <%#Server.HtmlEncode(Eval("Name").ToString())%></a>
                                </td>
                                <td>
                                    <%#Server.HtmlEncode(Eval("Url").ToString())%>
                                </td>
                                <td>
                                    <%#Eval("CreateTime")%>
                                </td>
                                <td class='align-c'>
                                    <a href="javascript:ShowDialog(1,<%#Eval("ID")%>)">
                                        <img alt="编辑" src="images/ico-edit.gif" /></a>
                                </td>
                                <td class='align-c'>
                                    <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("ID")%>'
                                        ImageUrl="images/ico-delete.gif" OnClientClick="return confirm('确定要删除吗?');" ToolTip="删除" />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
            <div id="noData" runat="server">
                <div class="noDateMsg">
                    没有任何信息！</div>
            </div>
            <div id="pageinfo" class="page">
                <webdiyer:AspNetPager ID="anpPage" runat="server" OnPageChanging="anpPage_PageChanging"
                    CurrentPageButtonClass="curPage" PageSize="50" AlwaysShow="true" ShowCustomInfoSection="left" CustomInfoTextAlign="Left" LayoutType="Table">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    </form>
</body>
</html>

